package com.zhongke.DKYCboot.util;

public class Msg {
	private String code;
	private String message;
	private Object data;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	@Override
	public String toString() {
		return "Msg [code=" + code + ", message=" + message + ", data=" + data + "]";
	}
	public Msg() {
		super();
	}
	
	public Msg(String code, String message, Object data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}
	public static Msg success(Object data) {
		return new Msg(Constans.SUCCESS_CODE, Constans.SUCCESS_MESSAGE, data);
	}
	public static Msg fail(Object data) {
		return new Msg(Constans.FAIL_CODE, Constans.FAIL_MESSAGE, data);
	}
	
}
